
#include <iostream>
#include <list>
#include <algorithm>

void test_case1() {

    std::list<int> coll = {1, 2, 2, 3, 3, 3, 4, 4, 4, 4};

    for (auto i : coll) 
        std::cout << i;

    std::cout << std::endl;

    auto pos =  std::unique(coll.begin(), coll.end());

    for (auto i : coll) 
        std::cout << i;

    std::cout << std::endl;

    coll.erase(pos, coll.end());

    for (auto i : coll) 
        std::cout << i;

    std::cout << std::endl;

}

int main() {

    test_case1();

    return 0;
}